<style rel="stylesheet/scss" lang="scss" scoped>
.container {
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    .dragWrapper {
        width: 1001px;
        height: 701px;
        overflow: hidden;
        position: relative;
        margin-top: 20px;
    }
}
</style>
<template>
    <div class="container">
        <div class="tools">
            <el-button type="primary" @click="handlePrint1">打印局部</el-button>
            <el-button type="primary" @click="handlePrint">打印全部</el-button>
        </div>

        <div id="test">
            <h2 style="color:red">我是测试字段</h2>
        </div>

    </div>
</template>

<script>
import BgImg from '@/assets/images/login_bg_01.jpg'
export default {
    data() {
        return {
            
        }
    },
    methods: {
        handlePrint1() {
            setTimeout(() => {
                this.$Print({
                    id: 'test'
                });
            }, 0)
        },
        handlePrint() {
            setTimeout(() => {
                this.$Print({
                    html: document.body.innerHTML
                });
            }, 0)
        }
    }
};
</script>

<style scoped>
</style>